public class FileUtils {
    public static String appendFileName(String original, String appendix) {
        int dotIndex = original.lastIndexOf(".");
        String[] parts = new String[2];
        parts[0] = original.substring(0, dotIndex);
        parts[1] = original.substring(dotIndex);
        String resultFileName = parts[0] + "-" + appendix + parts[1];
        return resultFileName;
    }
}
